package cyou.breathe.tools;

import static cyou.breathe.constant.UserConstant.USER_REGISTER_REUSE_SHARDING_COUNT;

/**
 * 用户名可复用工具类
 * @author: breathe
 * @createTime: 2025-06-15
 */
public class UserReuseUtils {
    public static int hashShardingIdx(String username) {
        return Math.abs(username.hashCode() % USER_REGISTER_REUSE_SHARDING_COUNT);
    }
}
